import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.shape.Line;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.FontPosture;
import javafx.scene.paint.Color;

public class Test extends Application {
	public void start(Stage stage) {
		Text txt=new Text(20,50,"Hello world");
		txt.setFont(Font.font("Consolas",FontWeight.BOLD, FontPosture.ITALIC,20));
		txt.setFill(Color.YELLOWGREEN);
		txt.setStroke(Color.RED);
		txt.setStrokeWidth(0.5);
		txt.setStrikethrough(true);
		txt.setUnderline(true);

		Line line=new Line(10,100,90,0);
		
		Rectangle rect=new Rectangle(5,5,30,30);
		rect.setFill(null);
		rect.setStroke(Color.BLACK);
		rect.setRotate(1); 

		Pane pane=new Pane();
		pane.getChildren().add(txt);
		pane.getChildren().add(line);
		line.endXProperty().bind(pane.widthProperty());
		pane.getChildren().add(rect);

		Scene scene=new Scene(pane);

		stage.setScene(scene);
		stage.setTitle("text test");
		stage.show();
	}
}
